/**
 * 文章api
 */
import instance from "@/utils/request";

//文章列表分页查询
export function GetArticleListApi(data = {}) {
    return instance.request({
        method: "post",
        url: "/article/list/page",
        data
    })
}

//文章标签列表查询(下拉框)
export function GetArticleLabelApi(belongFlag) {
    return instance.request({
        method: "get",
        url: `/label/box/list/${belongFlag}`,
    })
}

//文章启用禁用
export function StartArticleApi(articleId, recommend) {
    return instance.request({
        method: "get",
        url: `/article/setting/${articleId}/${recommend}`,
    })
}

//删除文章
export function DelArticleApi(articleId) {
    return instance.request({
        method: "get",
        url: `/article/delete/${articleId}`,
    })
}

//添加文章
export function AddArticleApi(data) {
    return instance.request({
        method: "post",
        url: `/article/add`,
        data
    })
}

//修改文章
export function EchoArticleApi(data) {
    return instance.request({
        method: "post",
        url: `/article/modify`,
        data
    })
}